<template>
  <router-view v-slot="{ Component }" class="router-view">
    
    <transition name="A">
    <keep-alive>
      <component
        :key="$route.name"
        :is="Component"
        v-if="$route.meta.keepAlive"
      />
    </keep-alive>
    </transition>
  </router-view>

  <router-view v-slot="{ Component }" class="router-view">
        <transition name="A">
    <component :is="Component" v-if="!$route.meta.keepAlive" />
       </transition>
  </router-view>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import { useStore } from "vuex";
export default defineComponent({
  setup() {
    const store=useStore();
    store.dispatch('asyncCartNum');  
  },
})
</script>

<style lang="scss">
html {
  font-size: calc(100vw / 37.5);
  
}

body{
  font-size: 13px;
}
@import "@/common/style/mixin";
::-webkit-scrollbar {
  display: none;
}
::scrollbar {
  display: none;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  overflow-x: hidden;
  height: 100vh;
}
.A-enter-active {
  transition: all .2s cubic-bezier(1, 0.5, 0.8, 1);
}


.A-enter-from{
  opacity: .6;
}
.A-leave-to {
  display: none;
}

</style>
